<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<base href="<%=basePath + "admin" %>"/>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link  rel="stylesheet" type="text/css" href="assets/plugins/bootstrap/css/bootstrap.css"/>
	<script type="text/javascript" src="assets/js/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="assets/plugins/bootstrap/js/bootstrap.js"></script>
	<link rel="stylesheet" type="text/css" href="assets/css/admin_frame.css"/>
	<script type="text/javascript">	
	function checkform(){
		
		checked=false;
		if(document.getElementById("name").value!="")
		{
			checked=true;
		}
		if (!checked){
			alert('请输入搜索信息');
			return false;
		}
	}
	</script>
  </head>
  
  <body>

  
  		<div id="mainbox">
  		<div id="header">
  				<jsp:include page="../../Template/admin_top.jsp"></jsp:include>
  		</div>
  		<div id="content" class="well">
  				<a href="admin/detool_addInput" id="add">添加应用</a><br><br>
	
			    <s:if test="detools.size > 0">
			    <s:form name="form1" action="admin/detool_query" method="post">
			   		<br />
			        
				</s:form>
			    <table class="table">
			    <tr><td>应用名</td><td>文件名</td><td>下载次数</td><td>上传时间</td><td></td><td></td><td></td></tr>
			    <s:iterator value="detools" var="detool">
			    	<tr>
    	
			   		<td width="80"><s:property value="name"/></td>
			   		
			   		<td width="150"><s:property value="dwUrl"/></td>
			   		
			   		<td width="80"><s:property value="downloadcount"/></td>
			   		
			   		<td width="250"><s:date name="uploadtime" format="yyyy-MM-dd HH:mm:ss"/></td>
			   		
					<td width="80"><a href="admin/detool_download?id=${detool.id}">点击下载</a></td>
			   		
			   		<td width="160"><a href="admin/detool_updateInput?id=${detool.id}">点击进入修改页面</a></td>
			   		
			   		<td width="80"><a href="admin/detool_delete?id=${detool.id}">删除</a></td>
			   		
			   		</tr>
			   	</s:iterator>
			   	</table>
			   	
			   	<p align="center">当前共有 <s:property value="rowCount"/> 条记录</p>
			   	<p align="center">当前共有 <s:property value="pageCount"/> 页</p>
			   	<p align="center">当前为 <s:property value="pageNow"/> 页</p>
			   	
			   	<!-- 页码超链接 -->
			   	
			   	<p align="center">
			   	
			   		<a href="admin/detool_list?pageNow=1">首页</a>
			   		
			   		<s:if test="pageNow-1 >= 1">
			   			<a href="admin/detool_list?pageNow=${pageNow-1 }">上一页</a>
			   		</s:if>
			   		<s:else>上一页</s:else>
			   		
			   		<s:if test="pageNow-2 >= 1">
			   			<a href="admin/detool_list?pageNow=${pageNow-2 }">${pageNow-2 }</a>
			   		</s:if>
			   		
			   		<s:if test="pageNow-1 >= 1">
			   			<a href="admin/detool_list?pageNow=${pageNow-1 }">${pageNow-1 }</a>
			   		</s:if>
			   		${pageNow }
			   		<s:if test="pageNow+1 <= pageCount">
			   			<a href="admin/detool_list?pageNow=${pageNow+1 }">${pageNow+1 }</a>
			   		</s:if>
			   		
			   		<s:if test="pageNow+2 <= pageCount">
			   			<a href="admin/detool_list?pageNow=${pageNow+2 }">${pageNow+2 }</a>
			   		</s:if>
			   		
			   		<s:if test="pageNow+1 <= pageCount">
			   			<a href="admin/detool_list?pageNow=${pageNow+1 }">下一页</a>
			   		</s:if>
			   		<s:else>下一页</s:else>
			   		
			   		<a href="admin/detool_list?pageNow=${pageCount }">尾页</a>
			   	</p>
			   	</s:if>
			   	<s:else>当前没有应用，请上传</s:else>
			   	<s:debug></s:debug>
  		</div>
  		<div id="footer">
  			<p>java 分享平台技术中心</p>
	    	<p>© Cuit software 2012 </p>
  		</div>
  		</div>
  	
  </body>
</html>
